<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数组</title>
    <script type="text/javascript">
        var array = new Array();
        var arr = [1,2,3,432,3,1,5435,4365,365643,1,3];
        // arr.forEach(function (value,index,obj) {
        //     if (value > 1){
        //         obj[index] = 0;
        //     }
        // });
        // console.log(arr);

        for (let i = 0; i < arr.length; i++) {
            for (let j = i+1; j < arr.length; j++) {
                if (arr[i] === arr[j]){
                    arr.splice(j,1);
                }
            }
        }
        console.log(arr);
    </script>
</head>
<body>

</body>
</html>